namespace GemBox.Spreadsheet
{
    using System;

    public class NamedRange
    {
        private bool globalName;
        internal int index;
        private string name;
        private object[] options;
        private NamedRangeCollection parent;
        private CellRange range;

        internal NamedRange(NamedRangeCollection parent, int index, object[] options, string name, CellRange range, bool globalName)
        {
            this.globalName = globalName;
            this.parent = parent;
            this.index = index;
            this.options = options;
            this.name = name;
            this.range = range;
        }

        public void Delete()
        {
            this.parent.DeleteInternal(this.index);
        }

        public bool GlobalName
        {
            get
            {
                return this.globalName;
            }
        }

        public string Name
        {
            get
            {
                return this.name;
            }
        }

        internal object[] Options
        {
            get
            {
                return this.options;
            }
        }

        public CellRange Range
        {
            get
            {
                return this.range;
            }
        }
    }
}
